package com.sun.entity.users;

import com.sun.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;

import java.util.List;

/**
 * MP自动填充Handler
 *
 * @Author sun
 * @CreateTime 2025/9/2 02:06
 */

@Data
@Table(name = "menus")
@Entity
@SQLDelete(sql = "update menus set deleted = id where id = ?")
public class Menu extends BaseEntity {
    @Id
    private Long id;
    private String path; // 路径
    private String component; //
    private String link; //  外链
    private String icon; // 图标
    private String title;
    @Column(columnDefinition = "bigint default 0")
    private Long parentId;
    @OneToMany
    List<Permission> permissions;

}
